package com.binguo.model.mapper;

import com.binguo.model.model.SbBindProductToCell;
import com.binguo.model.model.SbBindProductToCellExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SbBindProductToCellMapper {
    int countByExample(SbBindProductToCellExample example);

    int deleteByExample(SbBindProductToCellExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(SbBindProductToCell record);

    int insertSelective(SbBindProductToCell record);

    List<SbBindProductToCell> selectByExample(SbBindProductToCellExample example);

    SbBindProductToCell selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SbBindProductToCell record, @Param("example") SbBindProductToCellExample example);

    int updateByExample(@Param("record") SbBindProductToCell record, @Param("example") SbBindProductToCellExample example);

    int updateByPrimaryKeySelective(SbBindProductToCell record);

    int updateByPrimaryKey(SbBindProductToCell record);

    @Select("SELECT id as id,side_board_id as sideBoardId,cell as cell,product_id as productId,create_time as createTime,update_time as updateTime,creater as creater,updater as updater ,data_status as dataStatus FROM `sb_bind_product_to_cell` where sb_bind_product_to_cell.side_board_id = #{sideBoardId} and sb_bind_product_to_cell.cell = #{cell} and sb_bind_product_to_cell.data_status = 0")
    SbBindProductToCell selectBySideBoardAndCell(@Param("sideBoardId")Integer sideBoardId,@Param("cell") Integer cell);
}